package com.example.springboot.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.springboot.bean.Employee;
import com.example.springboot.service.EmployeeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmployeeController {


    @Reference
    private EmployeeService employeeService;

    @GetMapping("/getEmp/{id}")
    public Employee getEmpById(@PathVariable Integer id){
        return employeeService.getEmpById(id);
    }

}
